package com.example.demo.service;

import com.example.demo.dto.UserDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    private Logger log = LoggerFactory.getLogger(UserService.class);

    public String getUserName(){
        log.info("UserService-getUserName-开始");
        // 从数据库拿取数据
        UserDTO user = new UserDTO();
        user.setUserId("1");
        user.setUserName("小红");
        user.setSex(true);

        return user.getUserName();
    }
    public String getUserNameCopy(){
        log.info("UserService-getUserName-开始");
        // 从数据库拿取数据
        UserDTO user = new UserDTO();
        user.setUserId("1");
        user.setUserName("小红");
        user.setSex(true);

        return user.getUserName();
    }
}
